<%@ page import = "java.util.ArrayList" %>
<%@ page import = "com.mbbcpa.util.Constants" %>
<%@ page import = "com.mbbcpa.security.dao.*" %>

<%

ArrayList secGroupAccessList = (ArrayList) session.getAttribute(Constants.LOGON_ACCESS_LIST);
SecUserDao oSecUserDao = (SecUserDao) session.getAttribute(Constants.LOGGED_USER);
String sUserName = oSecUserDao.getUserName();
String lastLogonDateTime = (String) session.getAttribute(Constants.LAST_LOGON_DATETIME);

String selected = "";
int iSec001 = 0;
int iSec002 = 0;
int iSec003 = 0;
int iSec004 = 0;
int iSec005 = 0;
int iSec006 = 0;
int iSec007 = 0;
int iSec008 = 0;

for(int i=0;i<secGroupAccessList.size();i++){
	SecAccessDao secaccessDao = (SecAccessDao)secGroupAccessList.get(i);
	String strModuleCode  = secaccessDao.getModuleCode();
	if(strModuleCode.equals("SEC001"))
		iSec001 = 1;
	if(strModuleCode.equals("SEC002"))
		iSec002 = 1;
	if(strModuleCode.equals("SEC003"))
		iSec003 = 1;
	if(strModuleCode.equals("SEC004"))
		iSec004 = 1;
	if(strModuleCode.equals("SEC005"))
		iSec005 = 1;
	if(strModuleCode.equals("SEC006"))
		iSec006 = 1;
	if(strModuleCode.equals("SEC007"))
		iSec007 = 1;
	if(strModuleCode.equals("SEC008"))
		iSec008 = 1;
}

%>

<link href="resource/style.css" rel="stylesheet" type="text/css">
	
	<script type="text/javascript">
	    window.history.forward();
	    function noBack() { window.history.forward(); }
	</script>
<style type="text/css"></style></head>

<body class="home" onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
	<a name="top"></a>
	
<!-- Header -->
<%@ include file="/jsp/common/Header.jsp" %>	
<!-- End Header -->


	<div id="bgWrapper">
		<div id="container">

			<div id="titleBar">
				<ul class="topBar">
					<li class="goBackBt"><a href="<%=request.getContextPath()%>/CheckUserLogon.do?dispatch=homePage"></a></li>
					<li>
					  <h1>Security Management</h1></li>
				</ul>
			</div>

			<div id="fullcontent">
<!-- Security Navigation -->
<%@ include file="SecurityNavigation.jsp" %>	
<!-- End SecurityNavigation -->

<div id="contentRightIn">
	<table border="0" cellpadding="0" cellspacing="0" width="650px">
		<tbody><tr>
			<td>
				<div style="width:auto;height:auto;padding:12px 20px;margin:0 0 5px 0;display:block;font-size:20px;font-weight:bold;color:#ffb606;">
					What to do:
				</div>
				<table cellpadding="0" cellspacing="0" border="0">
                <tr>
                <td width="50%"> <div class="listingBox" <%=iSec001==1?"":"style='display:none'"%>>
							<a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain1" onclick="overlay();">
							<h3>Groups &amp; Modules Setup</h3>
							<br />
							Allows to add new user groups or new modules the system.</a>
                            </div></td>
                <td width="50%" ><div class="listingBox" <%=iSec002==1?"":"style='display:none'"%>>
							<a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain2" onclick="overlay();">
							<h3>Groups Level Setup</h3>
							<br />
							Add on user group to another to setup the user hierarchy.</a>
						</div></td>
                </tr>
                <tr>
                <td><div class="listingBox"  <%=iSec003==1?"":"style='display:none'"%>>
							<a "<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain3" onclick="overlay();">
							<h3>Access Rights Setup</h3>
							<br />
							Assign modules to the user group for access rights setup.</a>
						</div></td>
                <td><div class="listingBox" <%=iSec004==1?"":"style='display:none'"%>> 
                			<a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain4" onclick="overlay();">
                  <h3>User Creation</h3>
                  <br />
                  Create user of the group assigned.</a> </div></td>
                </tr>
                <tr>
            <td> <div class="listingBox" <%=iSec005==1?"":"style='display:none'"%>>
							<a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain5" onclick="overlay();">
							<h3>Security List </h3>
							<br />
						List all user groups, access rights and all users of the groups.</a>
						</div></td>
                <td><div class="listingBox" <%=iSec006==1?"":"style='display:none'"%>> <a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain6" onclick="overlay();">
                  <h3>Reset User</h3><br />
                  Reset a specified user access.<br />
                  <br /></a> </div></td>
                </tr>
                <tr>
                <td><div class="listingBox" <%=iSec007==1?"":"style='display:none'"%>> <a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain7" onclick="overlay();">
                  <h3>Parameter Setup</h3>
                  <br />
                  Configure system parameters.</a> </div></td>
            <td><div class="listingBox" <%=iSec008==1?"":"style='display:none'"%>>
							<a href="<%=request.getContextPath()%>/ShowSecurityScreen.do?dispatch=secmain8" onclick="overlay();">
							<h3>Audit Trail</h3>
							<br />
							Inquiry of user audit trail.</a>
						</div></td>
                </tr>
                </table>
						
			</td>
		</tr>
	</tbody></table>
</div>

				
			</div>

<!-- Footer -->
<%@ include file="/jsp/common/Footer.jsp" %>	
<!-- End Footer -->
		</div>
	</div>
